#将图片路径导入数据库
import os
from typing import NewType
from sql import ImagePathSql

rootM0 = r'.\training_image\M0'
rootM1 = r'.\training_image\M1'
files  = os.listdir(rootM0)
imgSql = ImagePathSql()

for file in files:
    filePath = rootM0 + '\\' + file
    file = file.lstrip('000')
    file = file.rstrip('-rk.jpg')
    tmpList = [file,filePath]
    imgSql.insertOneRow(tmpList)
    print(file)

